package com.datviet.service.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.datviet.dao.IPostDAO;
import com.datviet.entity.Post;
import com.datviet.service.IPostService;

@Service
public class PostService implements IPostService {

	@Autowired
	private IPostDAO postDao;
	
	@Override
	public List<Post> findLastedPost(String... searchingKeyword) {
//		List<Post> list = new ArrayList<Post>();
//		Post post = new Post();
//		post.setName("name1");
//		post.setText("text1");
//		post.setProfileImageUrl("http://www1168ui.sakura.ne.jp/interview/img/avatar/dog.jpg");
//		list.add(post);
//		list.add(post);
//		return list;
		return postDao.findLastedPost(searchingKeyword);
	}
}
